<?php
use Illuminate\Routing\Router;
use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
//Route::post('members_preservation','FriendController@MembersPreservation');    //
Route::post('test_index','TestController@index');    //
Route::any('create_shareholder','TestController@create_shareholder');    //
Route::any('clen_member','TestController@clen_member');    //
Route::any('clen_wx_user','TestController@clen_wx_user');    //
Route::any('sync_friend','TestController@sync_friend');    //
Route::any('pres_frame','TestController@pres_frame');    //  压测框架入口
Route::any('index_oss_resource','IndexController@index_oss_resource');    //
Route::any('hx_user_status','TestController@hx_user_status');    // 环信用户状态测试

//SandboxController
Route::any('Sandbox', 'SandboxController@index');
Route::any('Sandbox_submit', 'SandboxController@submit');
Route::any('Sandbox_test', 'SandboxController@test');
Route::any('test', 'SandboxController@insertT');
Route::any('Sandbox_html', 'SandboxController@html');
Route::any('Sandbox_ffmpeg_test', 'SandboxController@ffmpeg_test');
Route::any('Sandbox_sendSms','SandboxController@sendSms');                  //测试用短信验证码
Route::post('Login_registerSms','LoginController@registerSms');             //正式用短信验证码
Route::any('Login_test','LoginController@test');
Route::any('Oauth_weixin','OauthController@weixin');
Route::any('Oauth_setMenu','OauthController@setMenu');
Route::any('Oauth_getMenu','OauthController@getMenu');
Route::any('Oauth_weixin_jssdk_sign','OauthController@weixin_jssdk_sign');
Route::any('Oauth_login_weixin','OauthController@loginWeixin');                  //微信登錄授權
Route::any('Oauth_menu_url','OauthController@menuUrl');                          //微信登录授权
Route::any('Oauth_login_fb','OauthController@oauth_login_fb');                          //facebook 登录
Route::any('request_facebook','OauthController@request_facebook');                      //facebook 中转请求
Route::any('oauth_fb_callback','OauthController@oauth_fb_callback');                      //facebook 授权回调
Route::any('weix_Sharing_links','OauthController@SharingLinks');                        // 分享第三方 授权wx ,facebook
Route::any('Sharing_links','OauthController@SharingLinks');                             // 集成渠道分享：微信，facebook，微信朋友圈，qq，微博
Route::any('Oauth_add_user','OauthController@addUser');
Route::any('videoUpload','IndexController@videoUpload');
Route::any('App_Oauth_weixin','OauthController@appweixin'); //app微信授权登陆
Route::any('oauth_shareUrl', 'OauthController@getShareLink');  // 获取详情页分享链接
Route::any('sharing_details', 'IndexController@sharing_details');  // 详情页分享链接
Route::any('about_us','AboutusController@index');
Route::any('get_all_bg_picture','AboutusController@get_all_bg_picture');//获取所有背景图片
Route::any('set_user_picture','AboutusController@set_user_picture');//设置背景图片
Route::any('index_MediaReport','MediaController@report');           //视频举报
Route::any('index_MediaReporttype','MediaController@ReportType'); //视频举报的类型
Route::any('index_FailFriend','UserController@option_fail_friend');             //加黑名单/解除黑名单
Route::any('user_FailFriendList','UserController@fail_friend_list');             //黑名单列表
Route::any('user_UserReport','UserController@user_report');           //举报用户

Route::any('index_addMediaReply','IndexController@addMediaReply');
Route::any('media_Sharing','IndexController@SharingVideo');//视频分享
Route::post('index_callback', 'IndexController@callback')->name('callback')->middleware('checkOss');  //OSS上传文件回调
Route::post('setRegistrationId', 'JpushController@setRegistrationId');     // 设置jPush registration id
Route::any('push', 'TestController@pushTest');   // 推送测试
Route::post('es_create_user', 'EsearchController@createUsers');   // 创建user表,会删除旧表旧数据
Route::post('es_create_media', 'EsearchController@createMedia');  // 创建media表,会删除旧表旧数据
Route::post('es_add_users', 'EsearchController@addUsers');        // 批量添加数据
Route::post('es_add_medias', 'EsearchController@addMedias');
Route::post('es_add', 'EsearchController@add');               // 添加一条数据
Route::any('es_get_list', 'EsearchController@getEslist');     // 获取首页 用户、影片搜索列表
Route::any('activity_index', 'ActivityController@index');     // 获取活动
Route::any('activity_share_description', 'ActivityController@share_activity_description');     // 活动分享详情

Route::any('music_search', 'MusicController@search');     // 获取活动

// 香港服务器请求内地服务器记录
Route::any('Oauth_invite', 'OauthController@oauth_invite');     // 创建邀请记录

Route::middleware('apiTicketVerify')->group(function(){ //不做签名认证的路由
    Route::post('user_editAvatarSubmit','UserController@editAvatarSubmit');     //确认修改头像
});
Route::middleware('apiSignVerify')->group(function(){

    Route::post('login_register','LoginController@register');                   //前端注册
    Route::post('login_login','LoginController@login');                         //前端登录
    Route::post('verify_login','LoginController@VerifyLogin');                 //验证码登录
    Route::post('verify_number','LoginController@VerifyNumber');                 //检测手机号码是不是存在
    Route::post('login_registerSms','LoginController@registerSms');            //获取短信验证码
    Route::post('login_forgetPwd','LoginController@forgetPwd');                //修改登陆密码
    // Route::post('tages_selection','LoginController@UserTag');                //用户标签
    Route::post('tags_name','LoginController@TagsName');                   //标签名称
    Route::any('choice_tags','LoginController@ChoiceTags');               //标签选择
    //SystemController
    Route::any('system_index','SystemController@index');                        //版本更新
    Route::any('system_clearCache','SystemController@clearCache');              //清除缓存

    Route::any('index_category','IndexController@category'); //首页获取分类
    Route::any('index_activity_ranking','IndexController@index_activity_ranking'); // 活动排行榜
    Route::any('index_categoryList','IndexController@categoryList'); //首页获取资讯列表
    Route::any('index_shareQRCode','IndexController@get_shareQRCode'); //首页获取分享二维码
    Route::post('user_mediaList','IndexController@mediaList');                 //查看指定用户作品列表
    Route::post('user_homePage','IndexController@homePage');                 //他人或自己的用户主页
    Route::post('user_dynamicList','IndexController@dynamicList');                 //他人或自己的用户主页
    Route::post('random_number','IndexController@RandomNumber');                 //他人或自己的用户主页
    Route::post('media_delComment','MediaController@delComment');                // 删除评论

    // 2.0
    Route::any('media_mediaDetail','IndexController@media_mediaDetail');    //资讯详情评论
    // 2.0 blake
    Route::any('index_pushPlace','IndexController@pushPlace');    //资讯详情评论

    Route::any('index_getToken', 'IndexController@getUploadToken');             //获取Oss上传token
    Route::any('index_fileUpload', 'IndexController@fileUpload');             //获取Oss上传token
    Route::post('index_download','IndexController@index_download');    //股东证书/协议书下载

    Route::any('userAction', 'IndexController@action');  // 记录用户行为

    Route::any('background_music_list', 'MusicController@get_background_music_list');  // 背景音乐
});

Route::middleware(['apiSignVerify','apiTicketVerify'])->group(function(){
    //LoginController
    Route::post('login_logout','LoginController@logout');                       //前端登出
    Route::post('logout', 'UserController@logout');                             //登出操作
    //MediaController
    Route::post('media_mediaClass','MediaController@mediaClass');               //媒体分类
    Route::post('media_mediaPosition','MediaController@mediaPosition');         //媒体位置
    Route::post('media_mediaUpload','MediaController@mediaUpload');             //上传媒体
    Route::post('media_mediaUpdate','MediaController@mediaUpdate');             //更新影片封面和时长
    Route::post('collect_media','MediaController@collectMedia');                //收藏视频
    Route::post('del_collect_media','MediaController@delCollectMedia');          //取消收藏视频
    Route::post('media_modifyMedia','MediaController@modifyMedia');             //修改文章
    Route::post('media_delStar','MediaController@delStar');                     //取消关注
    Route::post('media_praise','MediaController@praise');                     //视频点赞
    Route::post('media_cancelpraise','MediaController@CancelPraise');        //视频取消点赞
    Route::post('media_forwarding','MediaController@ForwardingMedia');        // 转发视频

    Route::any('musicList', 'MediaController@musicList');            // 音乐列表
    Route::any('music_type', 'MediaController@MusicType');            // 音乐分类
    Route::any('music_count', 'MediaController@MusicCount');            // 音乐应用统计


    //UserController
    Route::post('user_editNickname','UserController@editNickname');             //修改昵称首页
    Route::post('user_editNicknameSubmit','UserController@editNicknameSubmit'); //确认修改昵称
    Route::post('user_editSexSubmit','UserController@editSexSubmit');           //确认修改性别
    Route::post('user_editMobileSubmit','UserController@editMobileSubmit');     //确认修改手机号
    Route::post('user_index','UserController@index');                           //我的首页
    Route::post('user_baseInfo','UserController@baseInfo');                     //我的首页
    Route::post('user_partakeList','UserController@partakeList');               //我的参与列表
    Route::post('collect_media_list','UserController@collectMediaList');                     //收藏列表
    Route::post('user_historyList','UserController@historyList');              //观看记录列表
    Route::post('user_delHistory','UserController@delHistory');              //删除观看记录
    Route::post('user_uploadList','UserController@uploadList');                 //我的上传列表
    Route::post('extension_members','FriendController@ExtensionMembers');    //推广会员信息
    Route::post('shareholder_identity','FriendController@shareholderIdentity');    //股东身份证信息保存
    Route::post('shareholder_info','FriendController@shareholderInfo');    //股东身份证信息保存
    Route::post('user_editUserInfoSubmit','UserController@editUserInfoSubmit');    //确认我的资料
    Route::any('invitation_UserDetails','UserController@invitationUserDetails');    // 获取邀请新人的情况
    Route::post('video_chat','UserController@video_chat');    // 视频聊天
    Route::post('modify_video_chat_status','UserController@modify_video_chat_status');    // 视频

    //FriendController
    Route::post('user_qrcode','UserController@qrcode');                         //我的二维码

    Route::post('friend_friendList','FriendController@friendList');             //好友列表
    Route::post('friend_friendAdd','FriendController@friendAdd');               //关注好友
    Route::post('friend_frienddel','FriendController@frienddel');               //取消关注好友!
    Route::post('friend_recommendList','FriendController@recommendLiRst');           //推荐人列表

    Route::post('bbs_articleList','BbsController@articleList');                 //社区文章列表
    Route::any('index_getWapToken', 'IndexController@getWapUploadToken');       //获取网页端OSS上传token

    Route::any('media_preview', 'MediaController@previewMedia');     // 预览视频链接

    Route::any('media_delMedia', 'MediaController@delMedia');   // 删除视频

    Route::post('friendApply', 'UserController@applyFriend');   // 申请好友
    Route::any('friendApplyList', 'UserController@applyList');  // 申请列表

    Route::post('changeApplyStatus', 'UserController@changeStatus');  // 修改申请状态
    Route::post('deleteFriend', 'UserController@deleteFriend'); // 删除好友
    Route::any('friendList', 'UserController@friendList');  // 好友列表
    Route::any('friendSearch', 'UserController@searchFriend'); // 搜索用户
    Route::any('addressBook', 'UserController@addressBook');  // 检验通讯录好友
    Route::any('sendMessage', 'UserController@sendMessage')->name('sendMessage');  // 发送短信
    Route::any('groupSendMessage', 'UserController@groupSendMessage');    // 群发短信
    Route::any('deleteApply', 'UserController@deleteApply');  // 删除申请

    // 2.0
    Route::any('sendApply', 'UserController@sendApply');  // 发送邀请
    Route::any('addressbookBinding', 'UserController@addressbookBinding');  // 通讯录绑定
    Route::any('addressbookCheck', 'UserController@addressbookCheck');  // 通讯录绑定
    Route::post('cancelFriend', 'FriendController@cancel_friend');   // 取消亲友

    Route::any('index_mediaCommentsList','MediaController@index_mediaCommentsList'); //视频评论列表
    Route::any('index_addMediaComments','MediaController@index_addMediaComments'); //添加评论/回复
    Route::post('media_director','MediaController@director');        //视频取消点赞

});


